package com.xtkj.superclub_entity.entity.photo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain=true)
@ToString
@TableName("z_personal_album")
public class PersonalAlbum implements Serializable {
    /*
        用户中心的个人相册，里面有默认相册，游记相册，以及朋友圈相册
    */
    @TableId(value = "personal_album_id",type = IdType.INPUT)
    private String personalAlbumId;//用户中心的个人相册id
    @TableId(value = "album_id",type = IdType.INPUT)
    private String albumId;//相册id
    private String albumName;//相册名称
    private int albumType;//相册类型 0代表自带相册 1代表用户建立的相册
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;//创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;//修改时间

    public PersonalAlbum(String personalAlbumId, String albumId, String albumName, int albumType, Date createTime) {
        this.personalAlbumId = personalAlbumId;
        this.albumId = albumId;
        this.albumName = albumName;
        this.albumType = albumType;
        this.createTime = createTime;
    }
}
